<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>接口详情</title>
    <%@include file="/WEB-INF/pages/common/taglib.jsp" %>
    <%@include file="/WEB-INF/pages/common/common.jsp" %>
    <style type="text/css">
        .popover {
            max-width: 500px;
            width: auto;
        }
    </style>

</head>
<body style="overflow-x: hidden">
<form id="detailForm">
    <div class="row-fluid box">
        <div class="span12 box-header">
            <div class="title span12">
                <div style="float:left">
                    <i class="icon-edit" style="color: #00F;">
                    </i>
                    <strong>接口详情</strong>
                </div>
                <div style="float:right">
                    <button class="btn btn-primary btn-small" id="btnSave" type="button" onclick="javascript:save()">
                        <i class="icon-save"></i>保存
                    </button>
                    <button class="btn btn-primary btn-small" type="button" onclick="javascript:history.go(-1)">
                        <i class="icon-reply-all"></i>返回
                    </button>
                </div>
            </div>
        </div>
        <div class="span12 box-content">
            <div class="span6" style="display:none">
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tbody>
                    <tr>
                        <td class="titleCss100">
                            接口编号
                        </td>
                        <td class="tdCss">
                            <input type="text" name="interId"
                                   value="${tAssistSysInter.interId}">
                        </td>
                    </tr>
                    </tbody>
                </table>
            </div>
            <div class="span6">
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tbody>
                    <tr>
                        <td class="titleCss100">
                            接口名称
                        </td>
                        <td class="tdCss">
                            <input type="text" name="interName"
                                   value="${tAssistSysInter.interName}">
                        </td>
                    </tr>
                    </tbody>
                </table>
            </div>
            <div class="span6">
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tbody>
                    <tr>
                        <td class="titleCss100">
                            接口IP
                        </td>
                        <td class="tdCss">
                            <input class="inputip" type="text" name="interIp"
                                   value="${tAssistSysInter.interIp}">
                        </td>
                    </tr>
                    </tbody>
                </table>
            </div>
            <div class="span6">
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tbody>
                    <tr>
                        <td class="titleCss100">
                            接口端口
                        </td>
                        <td class="tdCss">
                            <input type="text" name="interPort"
                                   value="${tAssistSysInter.interPort}">
                        </td>
                    </tr>
                    </tbody>
                </table>
            </div>
            <div class="span6">
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tbody>
                    <tr>
                        <td class="titleCss100">
                            接口类型
                        </td>
                        <td class="tdCss" style="padding-right: 6px">
                            <select style="width:100%;height:26px" name="interType">
                                <option value=""></option>
                                <option value="辅助海关" <c:if test="${tAssistSysInter.interType=='辅助海关'}">selected</c:if>>
                                    辅助海关
                                </option>
                                <option value="辅助国检" <c:if test="${tAssistSysInter.interType=='辅助国检'}">selected</c:if>>
                                    辅助国检
                                </option>
                            </select>
                        </td>
                    </tr>
                    </tbody>
                </table>
            </div>
            <div class="span6">
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tbody>
                    <tr>
                        <td class="titleCss100">
                            接入方式
                        </td>
                        <td class="tdCss" style="padding-right: 6px">
                            <select style="width:100%;height:26px" name="accessMethod">
                                <option value=""></option>
                                <option value="WebService"
                                        <c:if test="${tAssistSysInter.accessMethod=='WebService'}">selected</c:if>>
                                    WebService
                                </option>
                                <option value="FTP" <c:if test="${tAssistSysInter.accessMethod=='FTP'}">selected</c:if>>
                                    FTP
                                </option>
                                <option value="BizManager"
                                        <c:if test="${tAssistSysInter.accessMethod=='BizManager'}">selected</c:if>>
                                    BizManager
                                </option>
                                <option value="MQ" <c:if test="${tAssistSysInter.accessMethod=='MQ'}">selected</c:if>>MQ
                                </option>
                            </select>
                        </td>
                    </tr>
                    </tbody>
                </table>
            </div>
            <div class="span6">
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tbody>
                    <tr>
                        <td class="titleCss100">
                            接口状态
                        </td>
                        <td class="tdCss" style="padding-right: 6px">
                            <select style="width:100%;height:26px" name="interStatus">
                                <option value=""></option>
                                <option value="启用" <c:if test="${tAssistSysInter.interStatus=='启用'}">selected</c:if>>启用
                                </option>
                                <option value="禁用" <c:if test="${tAssistSysInter.interStatus=='禁用'}">selected</c:if>>禁用
                                </option>
                                <option value="运行中" <c:if test="${tAssistSysInter.interStatus=='运行中'}">selected</c:if>>
                                    运行中
                                </option>
                                <option value="连接异常"
                                        <c:if test="${tAssistSysInter.interStatus=='连接异常'}">selected</c:if>>连接异常
                                </option>
                                <option value="等待连接"
                                        <c:if test="${tAssistSysInter.interStatus=='等待连接'}">selected</c:if>>等待连接
                                </option>
                            </select>
                        </td>
                    </tr>
                    </tbody>
                </table>
            </div>
            <div class="span6">
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tbody>
                    <tr>
                        <td class="titleCss100">
                            接入时间
                        </td>
                        <td class="tdCss">
                            <input type="text" name="interDate"
                                   value="${tAssistSysInter.interDate}" style="width: 100%;" class="Wdate"
                                   onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})"
                                   timeformat="YYYY-MM-DD HH:MM:SS">
                        </td>
                    </tr>
                    </tbody>
                </table>
            </div>
            <div class="span12">
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tbody>
                    <tr>
                        <td class="titleCss100">
                            接口描述
                        </td>
                        <td class="tdCss">
                            <textarea rows="3" name="interDesc"
                                      style="width: 100%">${tAssistSysInter.interDesc}</textarea>
                        </td>
                    </tr>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</form>
<script type="text/javascript">
    function save() {
        $.ajax({
            type: "post",
            async: false,
            dataType: "json",
            url: $basePath + "/assistSys/saveTAssistSysInter",
            data: form2Json("detailForm"),
            success: function (result) {
                if (result) {
                    if ("success" == result) {
                        showOKMessage('保存成功!', '', function () {
                        });
                    } else {
                        ShowMessages(result, "系统提示", "msgwaring", null, 0);
                    }
                } else {
                    ShowMessages("保存失败", "系统提示", "msgwaring", null, 0);
                }
            }
        });
    }
    $(function () {
        $("#detailForm input,textarea,#btnSave,select").attr("disabled", ${modify});
    });


</script>
</body>
</html>
